import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
import type { ICourseClassifyModal } from '@/type';

export const useCourseClassifyStore = defineStore('courseClassify', () => {
    const courseClassifys = ref<ICourseClassifyModal[]>([]);

    const setCourseClassifys = (val: ICourseClassifyModal[]) => {
        console.log(val);

        courseClassifys.value = val;
    };

    const clearCourseClassifys = () => {
        courseClassifys.value = [];
    }

    return { courseClassifys, setCourseClassifys, clearCourseClassifys };
}, {
    persist: {
        storage: localStorage,
    }
})